package cn.tedu.bonfire.front.payment.dao.persist.repository.impl;

import cn.tedu.bonfire.front.payment.dao.persist.repository.IPayRepository;
import cn.tedu.bonfire.front.payment.pojo.entity.AliPayBean;
import cn.tedu.bonfire.front.payment.util.AliPayUtil;
import com.alipay.api.AlipayApiException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.io.IOException;

@Service
public class PayRepositoryImpl implements IPayRepository {

    @Autowired
    private AliPayUtil alipayUtil;

    @Override
    public String aliPay(AliPayBean alipayBean) throws AlipayApiException, IOException {
        return alipayUtil.pay(alipayBean);
    }
}
